home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_ambbdash.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  66 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_AmbBDash.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message        entered
  13.     message     pulse
  14.  
  15.     thing        soundPos0        nolink
  16.     thing        soundPos1        nolink
  17.     thing        soundPos2        nolink
  18.     thing        soundPos3        nolink
  19.     
  20.     sector      start_Amb1      linkID=1
  21.     sector      start_Amb2      linkID=1
  22.     
  23.     sector      stop_Amb1       linkID=0
  24.  
  25.     sound        ambient0=gen_cave_a1.wav   local
  26.     sound        ambient1=gen_cave_a2.wav   local
  27.     sound        ambient2=gen_cave_a3.wav   local
  28.     sound        ambient3=gen_cave_a4.wav   local
  29.     sound        ambient4=gen_cave_a5.wav   local
  30.     sound        ambient5=gen_cave_a6.wav   local
  31.     
  32.     int         soundsOn=0  local
  33.     
  34. end
  35.  
  36. # ========================================================================================
  37.  
  38. code
  39.  
  40. entered:
  41.  
  42.     if((GetSenderID() == 1) && (soundsOn == 0))
  43.     {
  44.         soundsOn = 1;
  45.         SetPulse(2.0);
  46.     }
  47.     
  48.     if(GetSenderID() == 0)
  49.     {
  50.         soundsOn = 0;
  51.         SetPulse(0.0);
  52.     }
  53.     
  54.     return;
  55.  
  56. # ========================================================================================
  57.  
  58. pulse:
  59.  
  60.     PlaySoundThing(ambient0[RandBetween(0, 5)], soundPos0[RandBetween(0, 3)], 1.0, 10, 20, 0);
  61.     return;
  62.  
  63. # ========================================================================================
  64.  
  65. end
  66.